package com.example.logindemo.event;

import com.example.logindemo.entity.User;
import org.springframework.context.ApplicationEvent;

/**
 * 用户注册事件
 * 当用户成功注册时触发此事件
 */
public class UserRegistrationEvent extends ApplicationEvent {
    
    private User user;

    public UserRegistrationEvent(Object source, User user) {
        super(source);
        this.user = user;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}